
<!DOCTYPE html>

<html>
  
<!-- Mirrored from docs.sympy.org/latest/modules/vector/api/classes.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 15 Jan 2022 03:29:13 GMT -->
<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=utf-8" /><!-- /Added by HTTrack -->
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />

    <title>Essential Classes in sympy.vector (docstrings) &#8212; SymPy 1.9 documentation</title>
    <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../../../_static/default.css" />
    <link rel="stylesheet" type="text/css" href="../../../_static/graphviz.css" />
    <link rel="stylesheet" type="text/css" href="../../../_static/plot_directive.css" />
    <link rel="stylesheet" type="text/css" href="../../../../../live.sympy.org/static/live-core.css" />
    <link rel="stylesheet" type="text/css" href="../../../../../live.sympy.org/static/live-autocomplete.css" />
    <link rel="stylesheet" type="text/css" href="../../../../../live.sympy.org/static/live-sphinx.css" />
    
    <script data-url_root="../../../" id="documentation_options" src="../../../_static/documentation_options.js"></script>
    <script src="../../../_static/jquery.js"></script>
    <script src="../../../_static/underscore.js"></script>
    <script src="../../../_static/doctools.js"></script>
    <script src="../../../../../live.sympy.org/static/utilities.js"></script>
    <script src="../../../../../live.sympy.org/static/external/classy.js"></script>
    <script src="../../../../../live.sympy.org/static/live-core.js"></script>
    <script src="../../../../../live.sympy.org/static/live-autocomplete.js"></script>
    <script src="../../../../../live.sympy.org/static/live-sphinx.js"></script>
    
    <link rel="shortcut icon" href="../../../_static/sympy-notailtext-favicon.ico"/>
    <link href="classes.html" rel="canonical" />
    
    <link rel="index" title="Index" href="../../../genindex.html" />
    <link rel="search" title="Search" href="../../../search.html" />
    <link rel="next" title="Orienter classes (docstrings)" href="orienterclasses.html" />
    <link rel="prev" title="Applications of Vector Integrals" href="../vector_integration.html" /> 
  </head><body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="orienterclasses.html" title="Orienter classes (docstrings)"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="../vector_integration.html" title="Applications of Vector Integrals"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../../../index.html">SymPy 1.9 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="../../index.html" >SymPy Modules Reference</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="../index.html" accesskey="U">Vector</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="#">Essential Classes in sympy.vector (docstrings)</a></li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <section id="essential-classes-in-sympy-vector-docstrings">
<h1>Essential Classes in sympy.vector (docstrings)<a class="headerlink" href="#essential-classes-in-sympy-vector-docstrings" title="Permalink to this headline">¶</a></h1>
<section id="coordsys3d">
<h2>CoordSys3D<a class="headerlink" href="#coordsys3d" title="Permalink to this headline">¶</a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="sympy.vector.coordsysrect.CoordSys3D">
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">sympy.vector.coordsysrect.</span></span><span class="sig-name descname"><span class="pre">CoordSys3D</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">transformation</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">parent</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">location</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">rotation_matrix</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">vector_names</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">variable_names</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/coordsysrect.py#L28-L1038"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.coordsysrect.CoordSys3D" title="Permalink to this definition">¶</a></dt>
<dd><p>Represents a coordinate system in 3-D space.</p>
<dl class="py method">
<dt class="sig sig-object py" id="sympy.vector.coordsysrect.CoordSys3D.__init__">
<span class="sig-name descname"><span class="pre">__init__</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">location</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">rotation_matrix</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">parent</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">vector_names</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">variable_names</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">latex_vects</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">pretty_vects</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">latex_scalars</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">pretty_scalars</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">transformation</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/coordsysrect.py#L1017-L1022"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.coordsysrect.CoordSys3D.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>The orientation/location parameters are necessary if this system
is being defined at a certain orientation or location wrt another.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>name</strong> : str</p>
<blockquote>
<div><p>The name of the new CoordSys3D instance.</p>
</div></blockquote>
<p><strong>transformation</strong> : Lambda, Tuple, str</p>
<blockquote>
<div><p>Transformation defined by transformation equations or chosen
from predefined ones.</p>
</div></blockquote>
<p><strong>location</strong> : Vector</p>
<blockquote>
<div><p>The position vector of the new system’s origin wrt the parent
instance.</p>
</div></blockquote>
<p><strong>rotation_matrix</strong> : SymPy ImmutableMatrix</p>
<blockquote>
<div><p>The rotation matrix of the new coordinate system with respect
to the parent. In other words, the output of
new_system.rotation_matrix(parent).</p>
</div></blockquote>
<p><strong>parent</strong> : CoordSys3D</p>
<blockquote>
<div><p>The coordinate system wrt which the orientation/location
(or both) is being defined.</p>
</div></blockquote>
<p><strong>vector_names, variable_names</strong> : iterable(optional)</p>
<blockquote>
<div><p>Iterables of 3 strings each, with custom names for base
vectors and base scalars of the new system respectively.
Used for simple str printing.</p>
</div></blockquote>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.vector.coordsysrect.CoordSys3D.create_new">
<span class="sig-name descname"><span class="pre">create_new</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">transformation</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">variable_names</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">vector_names</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/coordsysrect.py#L983-L1015"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.coordsysrect.CoordSys3D.create_new" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a CoordSys3D which is connected to self by transformation.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>name</strong> : str</p>
<blockquote>
<div><p>The name of the new CoordSys3D instance.</p>
</div></blockquote>
<p><strong>transformation</strong> : Lambda, Tuple, str</p>
<blockquote>
<div><p>Transformation defined by transformation equations or chosen
from predefined ones.</p>
</div></blockquote>
<p><strong>vector_names, variable_names</strong> : iterable(optional)</p>
<blockquote>
<div><p>Iterables of 3 strings each, with custom names for base
vectors and base scalars of the new system respectively.
Used for simple str printing.</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">CoordSys3D</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">a</span> <span class="o">=</span> <span class="n">CoordSys3D</span><span class="p">(</span><span class="s1">&#39;a&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">b</span> <span class="o">=</span> <span class="n">a</span><span class="o">.</span><span class="n">create_new</span><span class="p">(</span><span class="s1">&#39;b&#39;</span><span class="p">,</span> <span class="n">transformation</span><span class="o">=</span><span class="s1">&#39;spherical&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">b</span><span class="o">.</span><span class="n">transformation_to_parent</span><span class="p">()</span>
<span class="go">(b.r*sin(b.theta)*cos(b.phi), b.r*sin(b.phi)*sin(b.theta), b.r*cos(b.theta))</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">b</span><span class="o">.</span><span class="n">transformation_from_parent</span><span class="p">()</span>
<span class="go">(sqrt(a.x**2 + a.y**2 + a.z**2), acos(a.z/sqrt(a.x**2 + a.y**2 + a.z**2)), atan2(a.y, a.x))</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.vector.coordsysrect.CoordSys3D.locate_new">
<span class="sig-name descname"><span class="pre">locate_new</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">position</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">vector_names</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">variable_names</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/coordsysrect.py#L606-L645"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.coordsysrect.CoordSys3D.locate_new" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a CoordSys3D with its origin located at the given
position wrt this coordinate system’s origin.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>name</strong> : str</p>
<blockquote>
<div><p>The name of the new CoordSys3D instance.</p>
</div></blockquote>
<p><strong>position</strong> : Vector</p>
<blockquote>
<div><p>The position vector of the new system’s origin wrt this
one.</p>
</div></blockquote>
<p><strong>vector_names, variable_names</strong> : iterable(optional)</p>
<blockquote>
<div><p>Iterables of 3 strings each, with custom names for base
vectors and base scalars of the new system respectively.
Used for simple str printing.</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">CoordSys3D</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">A</span> <span class="o">=</span> <span class="n">CoordSys3D</span><span class="p">(</span><span class="s1">&#39;A&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">B</span> <span class="o">=</span> <span class="n">A</span><span class="o">.</span><span class="n">locate_new</span><span class="p">(</span><span class="s1">&#39;B&#39;</span><span class="p">,</span> <span class="mi">10</span> <span class="o">*</span> <span class="n">A</span><span class="o">.</span><span class="n">i</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">B</span><span class="o">.</span><span class="n">origin</span><span class="o">.</span><span class="n">position_wrt</span><span class="p">(</span><span class="n">A</span><span class="o">.</span><span class="n">origin</span><span class="p">)</span>
<span class="go">10*A.i</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.vector.coordsysrect.CoordSys3D.orient_new">
<span class="sig-name descname"><span class="pre">orient_new</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">orienters</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">location</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">vector_names</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">variable_names</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/coordsysrect.py#L647-L740"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.coordsysrect.CoordSys3D.orient_new" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates a new CoordSys3D oriented in the user-specified way
with respect to this system.</p>
<p>Please refer to the documentation of the orienter classes
for more information about the orientation procedure.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>name</strong> : str</p>
<blockquote>
<div><p>The name of the new CoordSys3D instance.</p>
</div></blockquote>
<p><strong>orienters</strong> : iterable/Orienter</p>
<blockquote>
<div><p>An Orienter or an iterable of Orienters for orienting the
new coordinate system.
If an Orienter is provided, it is applied to get the new
system.
If an iterable is provided, the orienters will be applied
in the order in which they appear in the iterable.</p>
</div></blockquote>
<p><strong>location</strong> : Vector(optional)</p>
<blockquote>
<div><p>The location of the new coordinate system’s origin wrt this
system’s origin. If not specified, the origins are taken to
be coincident.</p>
</div></blockquote>
<p><strong>vector_names, variable_names</strong> : iterable(optional)</p>
<blockquote>
<div><p>Iterables of 3 strings each, with custom names for base
vectors and base scalars of the new system respectively.
Used for simple str printing.</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">CoordSys3D</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">symbols</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">q0</span><span class="p">,</span> <span class="n">q1</span><span class="p">,</span> <span class="n">q2</span><span class="p">,</span> <span class="n">q3</span> <span class="o">=</span> <span class="n">symbols</span><span class="p">(</span><span class="s1">&#39;q0 q1 q2 q3&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">N</span> <span class="o">=</span> <span class="n">CoordSys3D</span><span class="p">(</span><span class="s1">&#39;N&#39;</span><span class="p">)</span>
</pre></div>
</div>
<p>Using an AxisOrienter</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">AxisOrienter</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">axis_orienter</span> <span class="o">=</span> <span class="n">AxisOrienter</span><span class="p">(</span><span class="n">q1</span><span class="p">,</span> <span class="n">N</span><span class="o">.</span><span class="n">i</span> <span class="o">+</span> <span class="mi">2</span> <span class="o">*</span> <span class="n">N</span><span class="o">.</span><span class="n">j</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">A</span> <span class="o">=</span> <span class="n">N</span><span class="o">.</span><span class="n">orient_new</span><span class="p">(</span><span class="s1">&#39;A&#39;</span><span class="p">,</span> <span class="p">(</span><span class="n">axis_orienter</span><span class="p">,</span> <span class="p">))</span>
</pre></div>
</div>
<p>Using a BodyOrienter</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">BodyOrienter</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">body_orienter</span> <span class="o">=</span> <span class="n">BodyOrienter</span><span class="p">(</span><span class="n">q1</span><span class="p">,</span> <span class="n">q2</span><span class="p">,</span> <span class="n">q3</span><span class="p">,</span> <span class="s1">&#39;123&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">B</span> <span class="o">=</span> <span class="n">N</span><span class="o">.</span><span class="n">orient_new</span><span class="p">(</span><span class="s1">&#39;B&#39;</span><span class="p">,</span> <span class="p">(</span><span class="n">body_orienter</span><span class="p">,</span> <span class="p">))</span>
</pre></div>
</div>
<p>Using a SpaceOrienter</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">SpaceOrienter</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">space_orienter</span> <span class="o">=</span> <span class="n">SpaceOrienter</span><span class="p">(</span><span class="n">q1</span><span class="p">,</span> <span class="n">q2</span><span class="p">,</span> <span class="n">q3</span><span class="p">,</span> <span class="s1">&#39;312&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">C</span> <span class="o">=</span> <span class="n">N</span><span class="o">.</span><span class="n">orient_new</span><span class="p">(</span><span class="s1">&#39;C&#39;</span><span class="p">,</span> <span class="p">(</span><span class="n">space_orienter</span><span class="p">,</span> <span class="p">))</span>
</pre></div>
</div>
<p>Using a QuaternionOrienter</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">QuaternionOrienter</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">q_orienter</span> <span class="o">=</span> <span class="n">QuaternionOrienter</span><span class="p">(</span><span class="n">q0</span><span class="p">,</span> <span class="n">q1</span><span class="p">,</span> <span class="n">q2</span><span class="p">,</span> <span class="n">q3</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">D</span> <span class="o">=</span> <span class="n">N</span><span class="o">.</span><span class="n">orient_new</span><span class="p">(</span><span class="s1">&#39;D&#39;</span><span class="p">,</span> <span class="p">(</span><span class="n">q_orienter</span><span class="p">,</span> <span class="p">))</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.vector.coordsysrect.CoordSys3D.orient_new_axis">
<span class="sig-name descname"><span class="pre">orient_new_axis</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">angle</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">axis</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">location</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">vector_names</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">variable_names</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/coordsysrect.py#L742-L790"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.coordsysrect.CoordSys3D.orient_new_axis" title="Permalink to this definition">¶</a></dt>
<dd><p>Axis rotation is a rotation about an arbitrary axis by
some angle. The angle is supplied as a SymPy expr scalar, and
the axis is supplied as a Vector.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>name</strong> : string</p>
<blockquote>
<div><p>The name of the new coordinate system</p>
</div></blockquote>
<p><strong>angle</strong> : Expr</p>
<blockquote>
<div><p>The angle by which the new system is to be rotated</p>
</div></blockquote>
<p><strong>axis</strong> : Vector</p>
<blockquote>
<div><p>The axis around which the rotation has to be performed</p>
</div></blockquote>
<p><strong>location</strong> : Vector(optional)</p>
<blockquote>
<div><p>The location of the new coordinate system’s origin wrt this
system’s origin. If not specified, the origins are taken to
be coincident.</p>
</div></blockquote>
<p><strong>vector_names, variable_names</strong> : iterable(optional)</p>
<blockquote>
<div><p>Iterables of 3 strings each, with custom names for base
vectors and base scalars of the new system respectively.
Used for simple str printing.</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">CoordSys3D</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">symbols</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">q1</span> <span class="o">=</span> <span class="n">symbols</span><span class="p">(</span><span class="s1">&#39;q1&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">N</span> <span class="o">=</span> <span class="n">CoordSys3D</span><span class="p">(</span><span class="s1">&#39;N&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">B</span> <span class="o">=</span> <span class="n">N</span><span class="o">.</span><span class="n">orient_new_axis</span><span class="p">(</span><span class="s1">&#39;B&#39;</span><span class="p">,</span> <span class="n">q1</span><span class="p">,</span> <span class="n">N</span><span class="o">.</span><span class="n">i</span> <span class="o">+</span> <span class="mi">2</span> <span class="o">*</span> <span class="n">N</span><span class="o">.</span><span class="n">j</span><span class="p">)</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.vector.coordsysrect.CoordSys3D.orient_new_body">
<span class="sig-name descname"><span class="pre">orient_new_body</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">angle1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">angle2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">angle3</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">rotation_order</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">location</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">vector_names</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">variable_names</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/coordsysrect.py#L792-L861"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.coordsysrect.CoordSys3D.orient_new_body" title="Permalink to this definition">¶</a></dt>
<dd><p>Body orientation takes this coordinate system through three
successive simple rotations.</p>
<p>Body fixed rotations include both Euler Angles and
Tait-Bryan Angles, see <a class="reference external" href="https://en.wikipedia.org/wiki/Euler_angles">https://en.wikipedia.org/wiki/Euler_angles</a>.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>name</strong> : string</p>
<blockquote>
<div><p>The name of the new coordinate system</p>
</div></blockquote>
<p><strong>angle1, angle2, angle3</strong> : Expr</p>
<blockquote>
<div><p>Three successive angles to rotate the coordinate system by</p>
</div></blockquote>
<p><strong>rotation_order</strong> : string</p>
<blockquote>
<div><p>String defining the order of axes for rotation</p>
</div></blockquote>
<p><strong>location</strong> : Vector(optional)</p>
<blockquote>
<div><p>The location of the new coordinate system’s origin wrt this
system’s origin. If not specified, the origins are taken to
be coincident.</p>
</div></blockquote>
<p><strong>vector_names, variable_names</strong> : iterable(optional)</p>
<blockquote>
<div><p>Iterables of 3 strings each, with custom names for base
vectors and base scalars of the new system respectively.
Used for simple str printing.</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">CoordSys3D</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">symbols</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">q1</span><span class="p">,</span> <span class="n">q2</span><span class="p">,</span> <span class="n">q3</span> <span class="o">=</span> <span class="n">symbols</span><span class="p">(</span><span class="s1">&#39;q1 q2 q3&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">N</span> <span class="o">=</span> <span class="n">CoordSys3D</span><span class="p">(</span><span class="s1">&#39;N&#39;</span><span class="p">)</span>
</pre></div>
</div>
<p>A ‘Body’ fixed rotation is described by three angles and
three body-fixed rotation axes. To orient a coordinate system D
with respect to N, each sequential rotation is always about
the orthogonal unit vectors fixed to D. For example, a ‘123’
rotation will specify rotations about N.i, then D.j, then
D.k. (Initially, D.i is same as N.i)
Therefore,</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">D</span> <span class="o">=</span> <span class="n">N</span><span class="o">.</span><span class="n">orient_new_body</span><span class="p">(</span><span class="s1">&#39;D&#39;</span><span class="p">,</span> <span class="n">q1</span><span class="p">,</span> <span class="n">q2</span><span class="p">,</span> <span class="n">q3</span><span class="p">,</span> <span class="s1">&#39;123&#39;</span><span class="p">)</span>
</pre></div>
</div>
<p>is same as</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">D</span> <span class="o">=</span> <span class="n">N</span><span class="o">.</span><span class="n">orient_new_axis</span><span class="p">(</span><span class="s1">&#39;D&#39;</span><span class="p">,</span> <span class="n">q1</span><span class="p">,</span> <span class="n">N</span><span class="o">.</span><span class="n">i</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">D</span> <span class="o">=</span> <span class="n">D</span><span class="o">.</span><span class="n">orient_new_axis</span><span class="p">(</span><span class="s1">&#39;D&#39;</span><span class="p">,</span> <span class="n">q2</span><span class="p">,</span> <span class="n">D</span><span class="o">.</span><span class="n">j</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">D</span> <span class="o">=</span> <span class="n">D</span><span class="o">.</span><span class="n">orient_new_axis</span><span class="p">(</span><span class="s1">&#39;D&#39;</span><span class="p">,</span> <span class="n">q3</span><span class="p">,</span> <span class="n">D</span><span class="o">.</span><span class="n">k</span><span class="p">)</span>
</pre></div>
</div>
<p>Acceptable rotation orders are of length 3, expressed in XYZ or
123, and cannot have a rotation about about an axis twice in a row.</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">B</span> <span class="o">=</span> <span class="n">N</span><span class="o">.</span><span class="n">orient_new_body</span><span class="p">(</span><span class="s1">&#39;B&#39;</span><span class="p">,</span> <span class="n">q1</span><span class="p">,</span> <span class="n">q2</span><span class="p">,</span> <span class="n">q3</span><span class="p">,</span> <span class="s1">&#39;123&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">B</span> <span class="o">=</span> <span class="n">N</span><span class="o">.</span><span class="n">orient_new_body</span><span class="p">(</span><span class="s1">&#39;B&#39;</span><span class="p">,</span> <span class="n">q1</span><span class="p">,</span> <span class="n">q2</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="s1">&#39;ZXZ&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">B</span> <span class="o">=</span> <span class="n">N</span><span class="o">.</span><span class="n">orient_new_body</span><span class="p">(</span><span class="s1">&#39;B&#39;</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="s1">&#39;XYX&#39;</span><span class="p">)</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.vector.coordsysrect.CoordSys3D.orient_new_quaternion">
<span class="sig-name descname"><span class="pre">orient_new_quaternion</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">q0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">q1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">q2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">q3</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">location</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">vector_names</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">variable_names</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/coordsysrect.py#L928-L981"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.coordsysrect.CoordSys3D.orient_new_quaternion" title="Permalink to this definition">¶</a></dt>
<dd><p>Quaternion orientation orients the new CoordSys3D with
Quaternions, defined as a finite rotation about lambda, a unit
vector, by some amount theta.</p>
<p>This orientation is described by four parameters:</p>
<p>q0 = cos(theta/2)</p>
<p>q1 = lambda_x sin(theta/2)</p>
<p>q2 = lambda_y sin(theta/2)</p>
<p>q3 = lambda_z sin(theta/2)</p>
<p>Quaternion does not take in a rotation order.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>name</strong> : string</p>
<blockquote>
<div><p>The name of the new coordinate system</p>
</div></blockquote>
<p><strong>q0, q1, q2, q3</strong> : Expr</p>
<blockquote>
<div><p>The quaternions to rotate the coordinate system by</p>
</div></blockquote>
<p><strong>location</strong> : Vector(optional)</p>
<blockquote>
<div><p>The location of the new coordinate system’s origin wrt this
system’s origin. If not specified, the origins are taken to
be coincident.</p>
</div></blockquote>
<p><strong>vector_names, variable_names</strong> : iterable(optional)</p>
<blockquote>
<div><p>Iterables of 3 strings each, with custom names for base
vectors and base scalars of the new system respectively.
Used for simple str printing.</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">CoordSys3D</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">symbols</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">q0</span><span class="p">,</span> <span class="n">q1</span><span class="p">,</span> <span class="n">q2</span><span class="p">,</span> <span class="n">q3</span> <span class="o">=</span> <span class="n">symbols</span><span class="p">(</span><span class="s1">&#39;q0 q1 q2 q3&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">N</span> <span class="o">=</span> <span class="n">CoordSys3D</span><span class="p">(</span><span class="s1">&#39;N&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">B</span> <span class="o">=</span> <span class="n">N</span><span class="o">.</span><span class="n">orient_new_quaternion</span><span class="p">(</span><span class="s1">&#39;B&#39;</span><span class="p">,</span> <span class="n">q0</span><span class="p">,</span> <span class="n">q1</span><span class="p">,</span> <span class="n">q2</span><span class="p">,</span> <span class="n">q3</span><span class="p">)</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.vector.coordsysrect.CoordSys3D.orient_new_space">
<span class="sig-name descname"><span class="pre">orient_new_space</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">angle1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">angle2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">angle3</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">rotation_order</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">location</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">vector_names</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">variable_names</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/coordsysrect.py#L863-L926"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.coordsysrect.CoordSys3D.orient_new_space" title="Permalink to this definition">¶</a></dt>
<dd><p>Space rotation is similar to Body rotation, but the rotations
are applied in the opposite order.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>name</strong> : string</p>
<blockquote>
<div><p>The name of the new coordinate system</p>
</div></blockquote>
<p><strong>angle1, angle2, angle3</strong> : Expr</p>
<blockquote>
<div><p>Three successive angles to rotate the coordinate system by</p>
</div></blockquote>
<p><strong>rotation_order</strong> : string</p>
<blockquote>
<div><p>String defining the order of axes for rotation</p>
</div></blockquote>
<p><strong>location</strong> : Vector(optional)</p>
<blockquote>
<div><p>The location of the new coordinate system’s origin wrt this
system’s origin. If not specified, the origins are taken to
be coincident.</p>
</div></blockquote>
<p><strong>vector_names, variable_names</strong> : iterable(optional)</p>
<blockquote>
<div><p>Iterables of 3 strings each, with custom names for base
vectors and base scalars of the new system respectively.
Used for simple str printing.</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">CoordSys3D</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">symbols</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">q1</span><span class="p">,</span> <span class="n">q2</span><span class="p">,</span> <span class="n">q3</span> <span class="o">=</span> <span class="n">symbols</span><span class="p">(</span><span class="s1">&#39;q1 q2 q3&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">N</span> <span class="o">=</span> <span class="n">CoordSys3D</span><span class="p">(</span><span class="s1">&#39;N&#39;</span><span class="p">)</span>
</pre></div>
</div>
<p>To orient a coordinate system D with respect to N, each
sequential rotation is always about N’s orthogonal unit vectors.
For example, a ‘123’ rotation will specify rotations about
N.i, then N.j, then N.k.
Therefore,</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">D</span> <span class="o">=</span> <span class="n">N</span><span class="o">.</span><span class="n">orient_new_space</span><span class="p">(</span><span class="s1">&#39;D&#39;</span><span class="p">,</span> <span class="n">q1</span><span class="p">,</span> <span class="n">q2</span><span class="p">,</span> <span class="n">q3</span><span class="p">,</span> <span class="s1">&#39;312&#39;</span><span class="p">)</span>
</pre></div>
</div>
<p>is same as</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">B</span> <span class="o">=</span> <span class="n">N</span><span class="o">.</span><span class="n">orient_new_axis</span><span class="p">(</span><span class="s1">&#39;B&#39;</span><span class="p">,</span> <span class="n">q1</span><span class="p">,</span> <span class="n">N</span><span class="o">.</span><span class="n">i</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">C</span> <span class="o">=</span> <span class="n">B</span><span class="o">.</span><span class="n">orient_new_axis</span><span class="p">(</span><span class="s1">&#39;C&#39;</span><span class="p">,</span> <span class="n">q2</span><span class="p">,</span> <span class="n">N</span><span class="o">.</span><span class="n">j</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">D</span> <span class="o">=</span> <span class="n">C</span><span class="o">.</span><span class="n">orient_new_axis</span><span class="p">(</span><span class="s1">&#39;D&#39;</span><span class="p">,</span> <span class="n">q3</span><span class="p">,</span> <span class="n">N</span><span class="o">.</span><span class="n">k</span><span class="p">)</span>
</pre></div>
</div>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<dl class="simple">
<dt><a class="reference internal" href="#sympy.vector.coordsysrect.CoordSys3D.orient_new_body" title="sympy.vector.coordsysrect.CoordSys3D.orient_new_body"><code class="xref py py-obj docutils literal notranslate"><span class="pre">CoordSys3D.orient_new_body</span></code></a></dt><dd><p>method to orient via Euler angles</p>
</dd>
</dl>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.vector.coordsysrect.CoordSys3D.position_wrt">
<span class="sig-name descname"><span class="pre">position_wrt</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">other</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/coordsysrect.py#L543-L567"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.coordsysrect.CoordSys3D.position_wrt" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the position vector of the origin of this coordinate
system with respect to another Point/CoordSys3D.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>other</strong> : Point/CoordSys3D</p>
<blockquote>
<div><p>If other is a Point, the position of this system’s origin
wrt it is returned. If its an instance of CoordSyRect,
the position wrt its origin is returned.</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">CoordSys3D</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">N</span> <span class="o">=</span> <span class="n">CoordSys3D</span><span class="p">(</span><span class="s1">&#39;N&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">N1</span> <span class="o">=</span> <span class="n">N</span><span class="o">.</span><span class="n">locate_new</span><span class="p">(</span><span class="s1">&#39;N1&#39;</span><span class="p">,</span> <span class="mi">10</span> <span class="o">*</span> <span class="n">N</span><span class="o">.</span><span class="n">i</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">N</span><span class="o">.</span><span class="n">position_wrt</span><span class="p">(</span><span class="n">N1</span><span class="p">)</span>
<span class="go">(-10)*N.i</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.vector.coordsysrect.CoordSys3D.rotation_matrix">
<span class="sig-name descname"><span class="pre">rotation_matrix</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">other</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/coordsysrect.py#L487-L541"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.coordsysrect.CoordSys3D.rotation_matrix" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the direction cosine matrix(DCM), also known as the
‘rotation matrix’ of this coordinate system with respect to
another system.</p>
<p>If v_a is a vector defined in system ‘A’ (in matrix format)
and v_b is the same vector defined in system ‘B’, then
v_a = A.rotation_matrix(B) * v_b.</p>
<p>A SymPy Matrix is returned.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>other</strong> : CoordSys3D</p>
<blockquote>
<div><p>The system which the DCM is generated to.</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">CoordSys3D</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">symbols</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">q1</span> <span class="o">=</span> <span class="n">symbols</span><span class="p">(</span><span class="s1">&#39;q1&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">N</span> <span class="o">=</span> <span class="n">CoordSys3D</span><span class="p">(</span><span class="s1">&#39;N&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">A</span> <span class="o">=</span> <span class="n">N</span><span class="o">.</span><span class="n">orient_new_axis</span><span class="p">(</span><span class="s1">&#39;A&#39;</span><span class="p">,</span> <span class="n">q1</span><span class="p">,</span> <span class="n">N</span><span class="o">.</span><span class="n">i</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">N</span><span class="o">.</span><span class="n">rotation_matrix</span><span class="p">(</span><span class="n">A</span><span class="p">)</span>
<span class="go">Matrix([</span>
<span class="go">[1,       0,        0],</span>
<span class="go">[0, cos(q1), -sin(q1)],</span>
<span class="go">[0, sin(q1),  cos(q1)]])</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.vector.coordsysrect.CoordSys3D.scalar_map">
<span class="sig-name descname"><span class="pre">scalar_map</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">other</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/coordsysrect.py#L569-L604"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.coordsysrect.CoordSys3D.scalar_map" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a dictionary which expresses the coordinate variables
(base scalars) of this frame in terms of the variables of
otherframe.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>otherframe</strong> : CoordSys3D</p>
<blockquote>
<div><p>The other system to map the variables to.</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">CoordSys3D</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">Symbol</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">A</span> <span class="o">=</span> <span class="n">CoordSys3D</span><span class="p">(</span><span class="s1">&#39;A&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">q</span> <span class="o">=</span> <span class="n">Symbol</span><span class="p">(</span><span class="s1">&#39;q&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">B</span> <span class="o">=</span> <span class="n">A</span><span class="o">.</span><span class="n">orient_new_axis</span><span class="p">(</span><span class="s1">&#39;B&#39;</span><span class="p">,</span> <span class="n">q</span><span class="p">,</span> <span class="n">A</span><span class="o">.</span><span class="n">k</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">A</span><span class="o">.</span><span class="n">scalar_map</span><span class="p">(</span><span class="n">B</span><span class="p">)</span>
<span class="go">{A.x: B.x*cos(q) - B.y*sin(q), A.y: B.x*sin(q) + B.y*cos(q), A.z: B.z}</span>
</pre></div>
</div>
</dd></dl>

</dd></dl>

</section>
<section id="vector">
<h2>Vector<a class="headerlink" href="#vector" title="Permalink to this headline">¶</a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="sympy.vector.vector.Vector">
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">sympy.vector.vector.</span></span><span class="sig-name descname"><span class="pre">Vector</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/vector.py#L14-L341"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.vector.Vector" title="Permalink to this definition">¶</a></dt>
<dd><p>Super class for all Vector classes.
Ideally, neither this class nor any of its subclasses should be
instantiated by the user.</p>
<dl class="py property">
<dt class="sig sig-object py" id="sympy.vector.vector.Vector.components">
<em class="property"><span class="pre">property</span> </em><span class="sig-name descname"><span class="pre">components</span></span><a class="headerlink" href="#sympy.vector.vector.Vector.components" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the components of this vector in the form of a
Python dictionary mapping BaseVector instances to the
corresponding measure numbers.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">CoordSys3D</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">C</span> <span class="o">=</span> <span class="n">CoordSys3D</span><span class="p">(</span><span class="s1">&#39;C&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">v</span> <span class="o">=</span> <span class="mi">3</span><span class="o">*</span><span class="n">C</span><span class="o">.</span><span class="n">i</span> <span class="o">+</span> <span class="mi">4</span><span class="o">*</span><span class="n">C</span><span class="o">.</span><span class="n">j</span> <span class="o">+</span> <span class="mi">5</span><span class="o">*</span><span class="n">C</span><span class="o">.</span><span class="n">k</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">v</span><span class="o">.</span><span class="n">components</span>
<span class="go">{C.i: 3, C.j: 4, C.k: 5}</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.vector.vector.Vector.cross">
<span class="sig-name descname"><span class="pre">cross</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">other</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/vector.py#L131-L173"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.vector.Vector.cross" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the cross product of this Vector with another Vector or
Dyadic instance.
The cross product is a Vector, if ‘other’ is a Vector. If ‘other’
is a Dyadic, this returns a Dyadic instance.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>other: Vector/Dyadic</strong></p>
<blockquote>
<div><p>The Vector or Dyadic we are crossing with.</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">CoordSys3D</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">C</span> <span class="o">=</span> <span class="n">CoordSys3D</span><span class="p">(</span><span class="s1">&#39;C&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">C</span><span class="o">.</span><span class="n">i</span><span class="o">.</span><span class="n">cross</span><span class="p">(</span><span class="n">C</span><span class="o">.</span><span class="n">j</span><span class="p">)</span>
<span class="go">C.k</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">C</span><span class="o">.</span><span class="n">i</span> <span class="o">^</span> <span class="n">C</span><span class="o">.</span><span class="n">i</span>
<span class="go">0</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">v</span> <span class="o">=</span> <span class="mi">3</span><span class="o">*</span><span class="n">C</span><span class="o">.</span><span class="n">i</span> <span class="o">+</span> <span class="mi">4</span><span class="o">*</span><span class="n">C</span><span class="o">.</span><span class="n">j</span> <span class="o">+</span> <span class="mi">5</span><span class="o">*</span><span class="n">C</span><span class="o">.</span><span class="n">k</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">v</span> <span class="o">^</span> <span class="n">C</span><span class="o">.</span><span class="n">i</span>
<span class="go">5*C.j + (-4)*C.k</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">d</span> <span class="o">=</span> <span class="n">C</span><span class="o">.</span><span class="n">i</span><span class="o">.</span><span class="n">outer</span><span class="p">(</span><span class="n">C</span><span class="o">.</span><span class="n">i</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">C</span><span class="o">.</span><span class="n">j</span><span class="o">.</span><span class="n">cross</span><span class="p">(</span><span class="n">d</span><span class="p">)</span>
<span class="go">(-1)*(C.k|C.i)</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.vector.vector.Vector.dot">
<span class="sig-name descname"><span class="pre">dot</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">other</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/vector.py#L64-L124"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.vector.Vector.dot" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the dot product of this Vector, either with another
Vector, or a Dyadic, or a Del operator.
If ‘other’ is a Vector, returns the dot product scalar (Sympy
expression).
If ‘other’ is a Dyadic, the dot product is returned as a Vector.
If ‘other’ is an instance of Del, returns the directional
derivative operator as a Python function. If this function is
applied to a scalar expression, it returns the directional
derivative of the scalar field wrt this Vector.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>other: Vector/Dyadic/Del</strong></p>
<blockquote>
<div><p>The Vector or Dyadic we are dotting with, or a Del operator .</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">CoordSys3D</span><span class="p">,</span> <span class="n">Del</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">C</span> <span class="o">=</span> <span class="n">CoordSys3D</span><span class="p">(</span><span class="s1">&#39;C&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">delop</span> <span class="o">=</span> <span class="n">Del</span><span class="p">()</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">C</span><span class="o">.</span><span class="n">i</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">C</span><span class="o">.</span><span class="n">j</span><span class="p">)</span>
<span class="go">0</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">C</span><span class="o">.</span><span class="n">i</span> <span class="o">&amp;</span> <span class="n">C</span><span class="o">.</span><span class="n">i</span>
<span class="go">1</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">v</span> <span class="o">=</span> <span class="mi">3</span><span class="o">*</span><span class="n">C</span><span class="o">.</span><span class="n">i</span> <span class="o">+</span> <span class="mi">4</span><span class="o">*</span><span class="n">C</span><span class="o">.</span><span class="n">j</span> <span class="o">+</span> <span class="mi">5</span><span class="o">*</span><span class="n">C</span><span class="o">.</span><span class="n">k</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">v</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">C</span><span class="o">.</span><span class="n">k</span><span class="p">)</span>
<span class="go">5</span>
<span class="gp">&gt;&gt;&gt; </span><span class="p">(</span><span class="n">C</span><span class="o">.</span><span class="n">i</span> <span class="o">&amp;</span> <span class="n">delop</span><span class="p">)(</span><span class="n">C</span><span class="o">.</span><span class="n">x</span><span class="o">*</span><span class="n">C</span><span class="o">.</span><span class="n">y</span><span class="o">*</span><span class="n">C</span><span class="o">.</span><span class="n">z</span><span class="p">)</span>
<span class="go">C.y*C.z</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">d</span> <span class="o">=</span> <span class="n">C</span><span class="o">.</span><span class="n">i</span><span class="o">.</span><span class="n">outer</span><span class="p">(</span><span class="n">C</span><span class="o">.</span><span class="n">i</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">C</span><span class="o">.</span><span class="n">i</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">d</span><span class="p">)</span>
<span class="go">C.i</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.vector.vector.Vector.magnitude">
<span class="sig-name descname"><span class="pre">magnitude</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/vector.py#L52-L56"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.vector.Vector.magnitude" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the magnitude of this vector.</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.vector.vector.Vector.normalize">
<span class="sig-name descname"><span class="pre">normalize</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/vector.py#L58-L62"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.vector.Vector.normalize" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the normalized version of this vector.</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.vector.vector.Vector.outer">
<span class="sig-name descname"><span class="pre">outer</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">other</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/vector.py#L180-L216"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.vector.Vector.outer" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the outer product of this vector with another, in the
form of a Dyadic instance.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>other</strong> : Vector</p>
<blockquote>
<div><p>The Vector with respect to which the outer product is to
be computed.</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">CoordSys3D</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">N</span> <span class="o">=</span> <span class="n">CoordSys3D</span><span class="p">(</span><span class="s1">&#39;N&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">N</span><span class="o">.</span><span class="n">i</span><span class="o">.</span><span class="n">outer</span><span class="p">(</span><span class="n">N</span><span class="o">.</span><span class="n">j</span><span class="p">)</span>
<span class="go">(N.i|N.j)</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.vector.vector.Vector.projection">
<span class="sig-name descname"><span class="pre">projection</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">other</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">scalar</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/vector.py#L218-L242"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.vector.Vector.projection" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the vector or scalar projection of the ‘other’ on ‘self’.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector.coordsysrect</span> <span class="kn">import</span> <span class="n">CoordSys3D</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">C</span> <span class="o">=</span> <span class="n">CoordSys3D</span><span class="p">(</span><span class="s1">&#39;C&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">i</span><span class="p">,</span> <span class="n">j</span><span class="p">,</span> <span class="n">k</span> <span class="o">=</span> <span class="n">C</span><span class="o">.</span><span class="n">base_vectors</span><span class="p">()</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">v1</span> <span class="o">=</span> <span class="n">i</span> <span class="o">+</span> <span class="n">j</span> <span class="o">+</span> <span class="n">k</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">v2</span> <span class="o">=</span> <span class="mi">3</span><span class="o">*</span><span class="n">i</span> <span class="o">+</span> <span class="mi">4</span><span class="o">*</span><span class="n">j</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">v1</span><span class="o">.</span><span class="n">projection</span><span class="p">(</span><span class="n">v2</span><span class="p">)</span>
<span class="go">7/3*C.i + 7/3*C.j + 7/3*C.k</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">v1</span><span class="o">.</span><span class="n">projection</span><span class="p">(</span><span class="n">v2</span><span class="p">,</span> <span class="n">scalar</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="go">7/3</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.vector.vector.Vector.separate">
<span class="sig-name descname"><span class="pre">separate</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/vector.py#L306-L330"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.vector.Vector.separate" title="Permalink to this definition">¶</a></dt>
<dd><p>The constituents of this vector in different coordinate systems,
as per its definition.</p>
<p>Returns a dict mapping each CoordSys3D to the corresponding
constituent Vector.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">CoordSys3D</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">R1</span> <span class="o">=</span> <span class="n">CoordSys3D</span><span class="p">(</span><span class="s1">&#39;R1&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">R2</span> <span class="o">=</span> <span class="n">CoordSys3D</span><span class="p">(</span><span class="s1">&#39;R2&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">v</span> <span class="o">=</span> <span class="n">R1</span><span class="o">.</span><span class="n">i</span> <span class="o">+</span> <span class="n">R2</span><span class="o">.</span><span class="n">i</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">v</span><span class="o">.</span><span class="n">separate</span><span class="p">()</span> <span class="o">==</span> <span class="p">{</span><span class="n">R1</span><span class="p">:</span> <span class="n">R1</span><span class="o">.</span><span class="n">i</span><span class="p">,</span> <span class="n">R2</span><span class="p">:</span> <span class="n">R2</span><span class="o">.</span><span class="n">i</span><span class="p">}</span>
<span class="go">True</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.vector.vector.Vector.to_matrix">
<span class="sig-name descname"><span class="pre">to_matrix</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">system</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/vector.py#L277-L304"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.vector.Vector.to_matrix" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the matrix form of this vector with respect to the
specified coordinate system.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>system</strong> : CoordSys3D</p>
<blockquote>
<div><p>The system wrt which the matrix form is to be computed</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">CoordSys3D</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">C</span> <span class="o">=</span> <span class="n">CoordSys3D</span><span class="p">(</span><span class="s1">&#39;C&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.abc</span> <span class="kn">import</span> <span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">,</span> <span class="n">c</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">v</span> <span class="o">=</span> <span class="n">a</span><span class="o">*</span><span class="n">C</span><span class="o">.</span><span class="n">i</span> <span class="o">+</span> <span class="n">b</span><span class="o">*</span><span class="n">C</span><span class="o">.</span><span class="n">j</span> <span class="o">+</span> <span class="n">c</span><span class="o">*</span><span class="n">C</span><span class="o">.</span><span class="n">k</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">v</span><span class="o">.</span><span class="n">to_matrix</span><span class="p">(</span><span class="n">C</span><span class="p">)</span>
<span class="go">Matrix([</span>
<span class="go">[a],</span>
<span class="go">[b],</span>
<span class="go">[c]])</span>
</pre></div>
</div>
</dd></dl>

</dd></dl>

</section>
<section id="dyadic">
<h2>Dyadic<a class="headerlink" href="#dyadic" title="Permalink to this headline">¶</a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="sympy.vector.dyadic.Dyadic">
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">sympy.vector.dyadic.</span></span><span class="sig-name descname"><span class="pre">Dyadic</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/dyadic.py#L11-L191"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.dyadic.Dyadic" title="Permalink to this definition">¶</a></dt>
<dd><p>Super class for all Dyadic-classes.</p>
<p class="rubric">References</p>
<dl class="citation">
<dt class="label" id="r922"><span class="brackets"><a class="fn-backref" href="#id1">R922</a></span></dt>
<dd><p><a class="reference external" href="https://en.wikipedia.org/wiki/Dyadic_tensor">https://en.wikipedia.org/wiki/Dyadic_tensor</a></p>
</dd>
<dt class="label" id="r923"><span class="brackets"><a class="fn-backref" href="#id2">R923</a></span></dt>
<dd><p>Kane, T., Levinson, D. Dynamics Theory and Applications. 1985
McGraw-Hill</p>
</dd>
</dl>
<dl class="py property">
<dt class="sig sig-object py" id="sympy.vector.dyadic.Dyadic.components">
<em class="property"><span class="pre">property</span> </em><span class="sig-name descname"><span class="pre">components</span></span><a class="headerlink" href="#sympy.vector.dyadic.Dyadic.components" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the components of this dyadic in the form of a
Python dictionary mapping BaseDyadic instances to the
corresponding measure numbers.</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.vector.dyadic.Dyadic.cross">
<span class="sig-name descname"><span class="pre">cross</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">other</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/dyadic.py#L98-L132"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.dyadic.Dyadic.cross" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the cross product between this Dyadic, and a Vector, as a
Vector instance.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>other</strong> : Vector</p>
<blockquote>
<div><p>The Vector that we are crossing this Dyadic with</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">CoordSys3D</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">N</span> <span class="o">=</span> <span class="n">CoordSys3D</span><span class="p">(</span><span class="s1">&#39;N&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">d</span> <span class="o">=</span> <span class="n">N</span><span class="o">.</span><span class="n">i</span><span class="o">.</span><span class="n">outer</span><span class="p">(</span><span class="n">N</span><span class="o">.</span><span class="n">i</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">d</span><span class="o">.</span><span class="n">cross</span><span class="p">(</span><span class="n">N</span><span class="o">.</span><span class="n">j</span><span class="p">)</span>
<span class="go">(N.i|N.k)</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.vector.dyadic.Dyadic.dot">
<span class="sig-name descname"><span class="pre">dot</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">other</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/dyadic.py#L45-L91"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.dyadic.Dyadic.dot" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the dot product(also called inner product) of this
Dyadic, with another Dyadic or Vector.
If ‘other’ is a Dyadic, this returns a Dyadic. Else, it returns
a Vector (unless an error is encountered).</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>other</strong> : Dyadic/Vector</p>
<blockquote>
<div><p>The other Dyadic or Vector to take the inner product with</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">CoordSys3D</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">N</span> <span class="o">=</span> <span class="n">CoordSys3D</span><span class="p">(</span><span class="s1">&#39;N&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">D1</span> <span class="o">=</span> <span class="n">N</span><span class="o">.</span><span class="n">i</span><span class="o">.</span><span class="n">outer</span><span class="p">(</span><span class="n">N</span><span class="o">.</span><span class="n">j</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">D2</span> <span class="o">=</span> <span class="n">N</span><span class="o">.</span><span class="n">j</span><span class="o">.</span><span class="n">outer</span><span class="p">(</span><span class="n">N</span><span class="o">.</span><span class="n">j</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">D1</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">D2</span><span class="p">)</span>
<span class="go">(N.i|N.j)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">D1</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">N</span><span class="o">.</span><span class="n">j</span><span class="p">)</span>
<span class="go">N.i</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.vector.dyadic.Dyadic.to_matrix">
<span class="sig-name descname"><span class="pre">to_matrix</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">system</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">second_system</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/dyadic.py#L139-L182"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.dyadic.Dyadic.to_matrix" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the matrix form of the dyadic with respect to one or two
coordinate systems.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>system</strong> : CoordSys3D</p>
<blockquote>
<div><p>The coordinate system that the rows and columns of the matrix
correspond to. If a second system is provided, this
only corresponds to the rows of the matrix.</p>
</div></blockquote>
<p><strong>second_system</strong> : CoordSys3D, optional, default=None</p>
<blockquote>
<div><p>The coordinate system that the columns of the matrix correspond
to.</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">CoordSys3D</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">N</span> <span class="o">=</span> <span class="n">CoordSys3D</span><span class="p">(</span><span class="s1">&#39;N&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">v</span> <span class="o">=</span> <span class="n">N</span><span class="o">.</span><span class="n">i</span> <span class="o">+</span> <span class="mi">2</span><span class="o">*</span><span class="n">N</span><span class="o">.</span><span class="n">j</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">d</span> <span class="o">=</span> <span class="n">v</span><span class="o">.</span><span class="n">outer</span><span class="p">(</span><span class="n">N</span><span class="o">.</span><span class="n">i</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">d</span><span class="o">.</span><span class="n">to_matrix</span><span class="p">(</span><span class="n">N</span><span class="p">)</span>
<span class="go">Matrix([</span>
<span class="go">[1, 0, 0],</span>
<span class="go">[2, 0, 0],</span>
<span class="go">[0, 0, 0]])</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">Symbol</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">q</span> <span class="o">=</span> <span class="n">Symbol</span><span class="p">(</span><span class="s1">&#39;q&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">P</span> <span class="o">=</span> <span class="n">N</span><span class="o">.</span><span class="n">orient_new_axis</span><span class="p">(</span><span class="s1">&#39;P&#39;</span><span class="p">,</span> <span class="n">q</span><span class="p">,</span> <span class="n">N</span><span class="o">.</span><span class="n">k</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">d</span><span class="o">.</span><span class="n">to_matrix</span><span class="p">(</span><span class="n">N</span><span class="p">,</span> <span class="n">P</span><span class="p">)</span>
<span class="go">Matrix([</span>
<span class="go">[  cos(q),   -sin(q), 0],</span>
<span class="go">[2*cos(q), -2*sin(q), 0],</span>
<span class="go">[       0,         0, 0]])</span>
</pre></div>
</div>
</dd></dl>

</dd></dl>

</section>
<section id="del">
<h2>Del<a class="headerlink" href="#del" title="Permalink to this headline">¶</a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="sympy.vector.deloperator.Del">
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">sympy.vector.deloperator.</span></span><span class="sig-name descname"><span class="pre">Del</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">system</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/deloperator.py#L6-L129"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.deloperator.Del" title="Permalink to this definition">¶</a></dt>
<dd><p>Represents the vector differential operator, usually represented in
mathematical expressions as the ‘nabla’ symbol.</p>
<dl class="py method">
<dt class="sig sig-object py" id="sympy.vector.deloperator.Del.cross">
<span class="sig-name descname"><span class="pre">cross</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">vect</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">doit</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/deloperator.py#L92-L123"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.deloperator.Del.cross" title="Permalink to this definition">¶</a></dt>
<dd><p>Represents the cross product between this operator and a given
vector - equal to the curl of the vector field.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>vect</strong> : Vector</p>
<blockquote>
<div><p>The vector whose curl is to be calculated.</p>
</div></blockquote>
<p><strong>doit</strong> : bool</p>
<blockquote>
<div><p>If True, the result is returned after calling .doit() on
each component. Else, the returned expression contains
Derivative instances</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">CoordSys3D</span><span class="p">,</span> <span class="n">Del</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">C</span> <span class="o">=</span> <span class="n">CoordSys3D</span><span class="p">(</span><span class="s1">&#39;C&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">delop</span> <span class="o">=</span> <span class="n">Del</span><span class="p">()</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">v</span> <span class="o">=</span> <span class="n">C</span><span class="o">.</span><span class="n">x</span><span class="o">*</span><span class="n">C</span><span class="o">.</span><span class="n">y</span><span class="o">*</span><span class="n">C</span><span class="o">.</span><span class="n">z</span> <span class="o">*</span> <span class="p">(</span><span class="n">C</span><span class="o">.</span><span class="n">i</span> <span class="o">+</span> <span class="n">C</span><span class="o">.</span><span class="n">j</span> <span class="o">+</span> <span class="n">C</span><span class="o">.</span><span class="n">k</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">delop</span><span class="o">.</span><span class="n">cross</span><span class="p">(</span><span class="n">v</span><span class="p">,</span> <span class="n">doit</span> <span class="o">=</span> <span class="kc">True</span><span class="p">)</span>
<span class="go">(-C.x*C.y + C.x*C.z)*C.i + (C.x*C.y - C.y*C.z)*C.j +</span>
<span class="go">    (-C.x*C.z + C.y*C.z)*C.k</span>
<span class="gp">&gt;&gt;&gt; </span><span class="p">(</span><span class="n">delop</span> <span class="o">^</span> <span class="n">C</span><span class="o">.</span><span class="n">i</span><span class="p">)</span><span class="o">.</span><span class="n">doit</span><span class="p">()</span>
<span class="go">0</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.vector.deloperator.Del.dot">
<span class="sig-name descname"><span class="pre">dot</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">vect</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">doit</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/deloperator.py#L58-L87"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.deloperator.Del.dot" title="Permalink to this definition">¶</a></dt>
<dd><p>Represents the dot product between this operator and a given
vector - equal to the divergence of the vector field.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>vect</strong> : Vector</p>
<blockquote>
<div><p>The vector whose divergence is to be calculated.</p>
</div></blockquote>
<p><strong>doit</strong> : bool</p>
<blockquote>
<div><p>If True, the result is returned after calling .doit() on
each component. Else, the returned expression contains
Derivative instances</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">CoordSys3D</span><span class="p">,</span> <span class="n">Del</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">delop</span> <span class="o">=</span> <span class="n">Del</span><span class="p">()</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">C</span> <span class="o">=</span> <span class="n">CoordSys3D</span><span class="p">(</span><span class="s1">&#39;C&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">delop</span><span class="o">.</span><span class="n">dot</span><span class="p">(</span><span class="n">C</span><span class="o">.</span><span class="n">x</span><span class="o">*</span><span class="n">C</span><span class="o">.</span><span class="n">i</span><span class="p">)</span>
<span class="go">Derivative(C.x, C.x)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">v</span> <span class="o">=</span> <span class="n">C</span><span class="o">.</span><span class="n">x</span><span class="o">*</span><span class="n">C</span><span class="o">.</span><span class="n">y</span><span class="o">*</span><span class="n">C</span><span class="o">.</span><span class="n">z</span> <span class="o">*</span> <span class="p">(</span><span class="n">C</span><span class="o">.</span><span class="n">i</span> <span class="o">+</span> <span class="n">C</span><span class="o">.</span><span class="n">j</span> <span class="o">+</span> <span class="n">C</span><span class="o">.</span><span class="n">k</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="p">(</span><span class="n">delop</span> <span class="o">&amp;</span> <span class="n">v</span><span class="p">)</span><span class="o">.</span><span class="n">doit</span><span class="p">()</span>
<span class="go">C.x*C.y + C.x*C.z + C.y*C.z</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.vector.deloperator.Del.gradient">
<span class="sig-name descname"><span class="pre">gradient</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">scalar_field</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">doit</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/deloperator.py#L24-L53"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.deloperator.Del.gradient" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the gradient of the given scalar field, as a
Vector instance.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>scalar_field</strong> : SymPy expression</p>
<blockquote>
<div><p>The scalar field to calculate the gradient of.</p>
</div></blockquote>
<p><strong>doit</strong> : bool</p>
<blockquote>
<div><p>If True, the result is returned after calling .doit() on
each component. Else, the returned expression contains
Derivative instances</p>
</div></blockquote>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">CoordSys3D</span><span class="p">,</span> <span class="n">Del</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">C</span> <span class="o">=</span> <span class="n">CoordSys3D</span><span class="p">(</span><span class="s1">&#39;C&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">delop</span> <span class="o">=</span> <span class="n">Del</span><span class="p">()</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">delop</span><span class="o">.</span><span class="n">gradient</span><span class="p">(</span><span class="mi">9</span><span class="p">)</span>
<span class="go">0</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">delop</span><span class="p">(</span><span class="n">C</span><span class="o">.</span><span class="n">x</span><span class="o">*</span><span class="n">C</span><span class="o">.</span><span class="n">y</span><span class="o">*</span><span class="n">C</span><span class="o">.</span><span class="n">z</span><span class="p">)</span><span class="o">.</span><span class="n">doit</span><span class="p">()</span>
<span class="go">C.y*C.z*C.i + C.x*C.z*C.j + C.x*C.y*C.k</span>
</pre></div>
</div>
</dd></dl>

</dd></dl>

</section>
<section id="parametricregion">
<h2>ParametricRegion<a class="headerlink" href="#parametricregion" title="Permalink to this headline">¶</a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="sympy.vector.parametricregion.ParametricRegion">
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">sympy.vector.parametricregion.</span></span><span class="sig-name descname"><span class="pre">ParametricRegion</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">definition</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">bounds</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/parametricregion.py#L11-L92"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.parametricregion.ParametricRegion" title="Permalink to this definition">¶</a></dt>
<dd><p>Represents a parametric region in space.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>definition</strong> : tuple to define base scalars in terms of parameters.</p>
<p><strong>bounds</strong> : Parameter or a tuple of length 3 to define parameter and corresponding lower and upper bound.</p>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">cos</span><span class="p">,</span> <span class="n">sin</span><span class="p">,</span> <span class="n">pi</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.abc</span> <span class="kn">import</span> <span class="n">r</span><span class="p">,</span> <span class="n">theta</span><span class="p">,</span> <span class="n">t</span><span class="p">,</span> <span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">,</span> <span class="n">x</span><span class="p">,</span> <span class="n">y</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">ParametricRegion</span>
</pre></div>
</div>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">ParametricRegion</span><span class="p">((</span><span class="n">t</span><span class="p">,</span> <span class="n">t</span><span class="o">**</span><span class="mi">2</span><span class="p">),</span> <span class="p">(</span><span class="n">t</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">))</span>
<span class="go">ParametricRegion((t, t**2), (t, -1, 2))</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">ParametricRegion</span><span class="p">((</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">),</span> <span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">),</span> <span class="p">(</span><span class="n">y</span><span class="p">,</span> <span class="mi">5</span><span class="p">,</span> <span class="mi">6</span><span class="p">))</span>
<span class="go">ParametricRegion((x, y), (x, 3, 4), (y, 5, 6))</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">ParametricRegion</span><span class="p">((</span><span class="n">r</span><span class="o">*</span><span class="n">cos</span><span class="p">(</span><span class="n">theta</span><span class="p">),</span> <span class="n">r</span><span class="o">*</span><span class="n">sin</span><span class="p">(</span><span class="n">theta</span><span class="p">)),</span> <span class="p">(</span><span class="n">r</span><span class="p">,</span> <span class="o">-</span><span class="mi">2</span><span class="p">,</span> <span class="mi">2</span><span class="p">),</span> <span class="p">(</span><span class="n">theta</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="n">pi</span><span class="p">))</span>
<span class="go">ParametricRegion((r*cos(theta), r*sin(theta)), (r, -2, 2), (theta, 0, pi))</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">ParametricRegion</span><span class="p">((</span><span class="n">a</span><span class="o">*</span><span class="n">cos</span><span class="p">(</span><span class="n">t</span><span class="p">),</span> <span class="n">b</span><span class="o">*</span><span class="n">sin</span><span class="p">(</span><span class="n">t</span><span class="p">)),</span> <span class="n">t</span><span class="p">)</span>
<span class="go">ParametricRegion((a*cos(t), b*sin(t)), t)</span>
</pre></div>
</div>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">circle</span> <span class="o">=</span> <span class="n">ParametricRegion</span><span class="p">((</span><span class="n">r</span><span class="o">*</span><span class="n">cos</span><span class="p">(</span><span class="n">theta</span><span class="p">),</span> <span class="n">r</span><span class="o">*</span><span class="n">sin</span><span class="p">(</span><span class="n">theta</span><span class="p">)),</span> <span class="n">r</span><span class="p">,</span> <span class="p">(</span><span class="n">theta</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="n">pi</span><span class="p">))</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">circle</span><span class="o">.</span><span class="n">parameters</span>
<span class="go">(r, theta)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">circle</span><span class="o">.</span><span class="n">definition</span>
<span class="go">(r*cos(theta), r*sin(theta))</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">circle</span><span class="o">.</span><span class="n">limits</span>
<span class="go">{theta: (0, pi)}</span>
</pre></div>
</div>
<p>Dimension of a parametric region determines whether a region is a curve, surface
or volume region. It does not represent its dimensions in space.</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">circle</span><span class="o">.</span><span class="n">dimensions</span>
<span class="go">1</span>
</pre></div>
</div>
</dd></dl>

</section>
<section id="implicitregion">
<h2>ImplicitRegion<a class="headerlink" href="#implicitregion" title="Permalink to this headline">¶</a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="sympy.vector.implicitregion.ImplicitRegion">
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">sympy.vector.implicitregion.</span></span><span class="sig-name descname"><span class="pre">ImplicitRegion</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">variables</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">equation</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/implicitregion.py#L11-L485"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.implicitregion.ImplicitRegion" title="Permalink to this definition">¶</a></dt>
<dd><p>Represents an implicit region in space.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>variables</strong> : tuple to map variables in implicit equation to base scalars.</p>
<p><strong>equation</strong> : An expression or Eq denoting the implicit equation of the region.</p>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">Eq</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.abc</span> <span class="kn">import</span> <span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">,</span> <span class="n">z</span><span class="p">,</span> <span class="n">t</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">ImplicitRegion</span>
</pre></div>
</div>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">ImplicitRegion</span><span class="p">((</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">),</span> <span class="n">x</span><span class="o">**</span><span class="mi">2</span> <span class="o">+</span> <span class="n">y</span><span class="o">**</span><span class="mi">2</span> <span class="o">-</span> <span class="mi">4</span><span class="p">)</span>
<span class="go">ImplicitRegion((x, y), x**2 + y**2 - 4)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">ImplicitRegion</span><span class="p">((</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">),</span> <span class="n">Eq</span><span class="p">(</span><span class="n">y</span><span class="o">*</span><span class="n">x</span><span class="p">,</span> <span class="mi">1</span><span class="p">))</span>
<span class="go">ImplicitRegion((x, y), x*y - 1)</span>
</pre></div>
</div>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">parabola</span> <span class="o">=</span> <span class="n">ImplicitRegion</span><span class="p">((</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">),</span> <span class="n">y</span><span class="o">**</span><span class="mi">2</span> <span class="o">-</span> <span class="mi">4</span><span class="o">*</span><span class="n">x</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">parabola</span><span class="o">.</span><span class="n">degree</span>
<span class="go">2</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">parabola</span><span class="o">.</span><span class="n">equation</span>
<span class="go">-4*x + y**2</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">parabola</span><span class="o">.</span><span class="n">rational_parametrization</span><span class="p">(</span><span class="n">t</span><span class="p">)</span>
<span class="go">(4/t**2, 4/t)</span>
</pre></div>
</div>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">r</span> <span class="o">=</span> <span class="n">ImplicitRegion</span><span class="p">((</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">,</span> <span class="n">z</span><span class="p">),</span> <span class="n">Eq</span><span class="p">(</span><span class="n">z</span><span class="p">,</span> <span class="n">x</span><span class="o">**</span><span class="mi">2</span> <span class="o">+</span> <span class="n">y</span><span class="o">**</span><span class="mi">2</span><span class="p">))</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">r</span><span class="o">.</span><span class="n">variables</span>
<span class="go">(x, y, z)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">r</span><span class="o">.</span><span class="n">singular_points</span><span class="p">()</span>
<span class="go">{(0, 0, 0)}</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">r</span><span class="o">.</span><span class="n">regular_point</span><span class="p">()</span>
<span class="go">(-10, -10, 200)</span>
</pre></div>
</div>
<dl class="py method">
<dt class="sig sig-object py" id="sympy.vector.implicitregion.ImplicitRegion.multiplicity">
<span class="sig-name descname"><span class="pre">multiplicity</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">point</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/implicitregion.py#L300-L335"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.implicitregion.ImplicitRegion.multiplicity" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the multiplicity of a singular point on the region.</p>
<p>A singular point (x,y) of region is said to be of multiplicity m
if all the partial derivatives off to order m - 1 vanish there.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.abc</span> <span class="kn">import</span> <span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">,</span> <span class="n">z</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">ImplicitRegion</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">I</span> <span class="o">=</span> <span class="n">ImplicitRegion</span><span class="p">((</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">,</span> <span class="n">z</span><span class="p">),</span> <span class="n">x</span><span class="o">**</span><span class="mi">2</span> <span class="o">+</span> <span class="n">y</span><span class="o">**</span><span class="mi">3</span> <span class="o">-</span> <span class="n">z</span><span class="o">**</span><span class="mi">4</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">I</span><span class="o">.</span><span class="n">singular_points</span><span class="p">()</span>
<span class="go">{(0, 0, 0)}</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">I</span><span class="o">.</span><span class="n">multiplicity</span><span class="p">((</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">))</span>
<span class="go">2</span>
</pre></div>
</div>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.vector.implicitregion.ImplicitRegion.rational_parametrization">
<span class="sig-name descname"><span class="pre">rational_parametrization</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">parameters</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">('t',</span> <span class="pre">'s')</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">reg_point</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/implicitregion.py#L337-L485"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.implicitregion.ImplicitRegion.rational_parametrization" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the rational parametrization of implict region.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">Eq</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.abc</span> <span class="kn">import</span> <span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">,</span> <span class="n">z</span><span class="p">,</span> <span class="n">s</span><span class="p">,</span> <span class="n">t</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">ImplicitRegion</span>
</pre></div>
</div>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">parabola</span> <span class="o">=</span> <span class="n">ImplicitRegion</span><span class="p">((</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">),</span> <span class="n">y</span><span class="o">**</span><span class="mi">2</span> <span class="o">-</span> <span class="mi">4</span><span class="o">*</span><span class="n">x</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">parabola</span><span class="o">.</span><span class="n">rational_parametrization</span><span class="p">()</span>
<span class="go">(4/t**2, 4/t)</span>
</pre></div>
</div>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">circle</span> <span class="o">=</span> <span class="n">ImplicitRegion</span><span class="p">((</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">),</span> <span class="n">Eq</span><span class="p">(</span><span class="n">x</span><span class="o">**</span><span class="mi">2</span> <span class="o">+</span> <span class="n">y</span><span class="o">**</span><span class="mi">2</span><span class="p">,</span> <span class="mi">4</span><span class="p">))</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">circle</span><span class="o">.</span><span class="n">rational_parametrization</span><span class="p">()</span>
<span class="go">(4*t/(t**2 + 1), 4*t**2/(t**2 + 1) - 2)</span>
</pre></div>
</div>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">I</span> <span class="o">=</span> <span class="n">ImplicitRegion</span><span class="p">((</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">),</span> <span class="n">x</span><span class="o">**</span><span class="mi">3</span> <span class="o">+</span> <span class="n">x</span><span class="o">**</span><span class="mi">2</span> <span class="o">-</span> <span class="n">y</span><span class="o">**</span><span class="mi">2</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">I</span><span class="o">.</span><span class="n">rational_parametrization</span><span class="p">()</span>
<span class="go">(t**2 - 1, t*(t**2 - 1))</span>
</pre></div>
</div>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">cubic_curve</span> <span class="o">=</span> <span class="n">ImplicitRegion</span><span class="p">((</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">),</span> <span class="n">x</span><span class="o">**</span><span class="mi">3</span> <span class="o">+</span> <span class="n">x</span><span class="o">**</span><span class="mi">2</span> <span class="o">-</span> <span class="n">y</span><span class="o">**</span><span class="mi">2</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">cubic_curve</span><span class="o">.</span><span class="n">rational_parametrization</span><span class="p">(</span><span class="n">parameters</span><span class="o">=</span><span class="p">(</span><span class="n">t</span><span class="p">))</span>
<span class="go">(t**2 - 1, t*(t**2 - 1))</span>
</pre></div>
</div>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">sphere</span> <span class="o">=</span> <span class="n">ImplicitRegion</span><span class="p">((</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">,</span> <span class="n">z</span><span class="p">),</span> <span class="n">x</span><span class="o">**</span><span class="mi">2</span> <span class="o">+</span> <span class="n">y</span><span class="o">**</span><span class="mi">2</span> <span class="o">+</span> <span class="n">z</span><span class="o">**</span><span class="mi">2</span> <span class="o">-</span> <span class="mi">4</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">sphere</span><span class="o">.</span><span class="n">rational_parametrization</span><span class="p">(</span><span class="n">parameters</span><span class="o">=</span><span class="p">(</span><span class="n">t</span><span class="p">,</span> <span class="n">s</span><span class="p">))</span>
<span class="go">(-2 + 4/(s**2 + t**2 + 1), 4*s/(s**2 + t**2 + 1), 4*t/(s**2 + t**2 + 1))</span>
</pre></div>
</div>
<p>For some conics, regular_points() is unable to find a point on curve.
To calulcate the parametric representation in such cases, user need
to determine a point on the region and pass it using reg_point.</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">c</span> <span class="o">=</span> <span class="n">ImplicitRegion</span><span class="p">((</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">),</span> <span class="p">(</span><span class="n">x</span>  <span class="o">-</span> <span class="mi">1</span><span class="o">/</span><span class="mi">2</span><span class="p">)</span><span class="o">**</span><span class="mi">2</span> <span class="o">+</span> <span class="p">(</span><span class="n">y</span><span class="p">)</span><span class="o">**</span><span class="mi">2</span> <span class="o">-</span> <span class="p">(</span><span class="mi">1</span><span class="o">/</span><span class="mi">4</span><span class="p">)</span><span class="o">**</span><span class="mi">2</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span><span class="o">.</span><span class="n">rational_parametrization</span><span class="p">(</span><span class="n">reg_point</span><span class="o">=</span><span class="p">(</span><span class="mi">3</span><span class="o">/</span><span class="mi">4</span><span class="p">,</span> <span class="mi">0</span><span class="p">))</span>
<span class="go">(0.75 - 0.5/(t**2 + 1), -0.5*t/(t**2 + 1))</span>
</pre></div>
</div>
<p class="rubric">References</p>
<ul class="simple">
<li><p>Christoph M. Hoffmann, “Conversion Methods between Parametric and
Implicit Curves and Surfaces”, Purdue e-Pubs, 1990. Available:
<a class="reference external" href="https://docs.lib.purdue.edu/cgi/viewcontent.cgi?article=1827&amp;context=cstech">https://docs.lib.purdue.edu/cgi/viewcontent.cgi?article=1827&amp;context=cstech</a></p></li>
</ul>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.vector.implicitregion.ImplicitRegion.regular_point">
<span class="sig-name descname"><span class="pre">regular_point</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/implicitregion.py#L72-L125"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.implicitregion.ImplicitRegion.regular_point" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a point on the implicit region.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.abc</span> <span class="kn">import</span> <span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">,</span> <span class="n">z</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">ImplicitRegion</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">circle</span> <span class="o">=</span> <span class="n">ImplicitRegion</span><span class="p">((</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">),</span> <span class="p">(</span><span class="n">x</span> <span class="o">+</span> <span class="mi">2</span><span class="p">)</span><span class="o">**</span><span class="mi">2</span> <span class="o">+</span> <span class="p">(</span><span class="n">y</span> <span class="o">-</span> <span class="mi">3</span><span class="p">)</span><span class="o">**</span><span class="mi">2</span> <span class="o">-</span> <span class="mi">16</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">circle</span><span class="o">.</span><span class="n">regular_point</span><span class="p">()</span>
<span class="go">(-2, -1)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">parabola</span> <span class="o">=</span> <span class="n">ImplicitRegion</span><span class="p">((</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">),</span> <span class="n">x</span><span class="o">**</span><span class="mi">2</span> <span class="o">-</span> <span class="mi">4</span><span class="o">*</span><span class="n">y</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">parabola</span><span class="o">.</span><span class="n">regular_point</span><span class="p">()</span>
<span class="go">(0, 0)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">r</span> <span class="o">=</span> <span class="n">ImplicitRegion</span><span class="p">((</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">,</span> <span class="n">z</span><span class="p">),</span> <span class="p">(</span><span class="n">x</span> <span class="o">+</span> <span class="n">y</span> <span class="o">+</span> <span class="n">z</span><span class="p">)</span><span class="o">**</span><span class="mi">4</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">r</span><span class="o">.</span><span class="n">regular_point</span><span class="p">()</span>
<span class="go">(-10, -10, 20)</span>
</pre></div>
</div>
<p class="rubric">References</p>
<ul class="simple">
<li><p>Erik Hillgarter, “Rational Points on Conics”, Diploma Thesis, RISC-Linz,
J. Kepler Universitat Linz, 1996. Availaible:
<a class="reference external" href="https://www3.risc.jku.at/publications/download/risc_1355/Rational Points on Conics.pdf">https://www3.risc.jku.at/publications/download/risc_1355/Rational%20Points%20on%20Conics.pdf</a></p></li>
</ul>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="sympy.vector.implicitregion.ImplicitRegion.singular_points">
<span class="sig-name descname"><span class="pre">singular_points</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/implicitregion.py#L277-L298"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.implicitregion.ImplicitRegion.singular_points" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a set of singular points of the region.</p>
<p>The singular points are those points on the region
where all partial derivatives vanish.</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.abc</span> <span class="kn">import</span> <span class="n">x</span><span class="p">,</span> <span class="n">y</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">ImplicitRegion</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">I</span> <span class="o">=</span> <span class="n">ImplicitRegion</span><span class="p">((</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">),</span> <span class="p">(</span><span class="n">y</span><span class="o">-</span><span class="mi">1</span><span class="p">)</span><span class="o">**</span><span class="mi">2</span> <span class="o">-</span><span class="n">x</span><span class="o">**</span><span class="mi">3</span> <span class="o">+</span> <span class="mi">2</span><span class="o">*</span><span class="n">x</span><span class="o">**</span><span class="mi">2</span> <span class="o">-</span><span class="n">x</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">I</span><span class="o">.</span><span class="n">singular_points</span><span class="p">()</span>
<span class="go">{(1, 1)}</span>
</pre></div>
</div>
</dd></dl>

</dd></dl>

</section>
<section id="parametricintegral">
<h2>ParametricIntegral<a class="headerlink" href="#parametricintegral" title="Permalink to this headline">¶</a></h2>
<dl class="py class">
<dt class="sig sig-object py" id="sympy.vector.integrals.ParametricIntegral">
<em class="property"><span class="pre">class</span> </em><span class="sig-prename descclassname"><span class="pre">sympy.vector.integrals.</span></span><span class="sig-name descname"><span class="pre">ParametricIntegral</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">field</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">parametricregion</span></span></em><span class="sig-paren">)</span><a class="reference external" href="https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/vector/integrals.py#L12-L142"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#sympy.vector.integrals.ParametricIntegral" title="Permalink to this definition">¶</a></dt>
<dd><p>Represents integral of a scalar or vector field
over a Parametric Region</p>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy</span> <span class="kn">import</span> <span class="n">cos</span><span class="p">,</span> <span class="n">sin</span><span class="p">,</span> <span class="n">pi</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.vector</span> <span class="kn">import</span> <span class="n">CoordSys3D</span><span class="p">,</span> <span class="n">ParametricRegion</span><span class="p">,</span> <span class="n">ParametricIntegral</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">sympy.abc</span> <span class="kn">import</span> <span class="n">r</span><span class="p">,</span> <span class="n">t</span><span class="p">,</span> <span class="n">theta</span><span class="p">,</span> <span class="n">phi</span>
</pre></div>
</div>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">C</span> <span class="o">=</span> <span class="n">CoordSys3D</span><span class="p">(</span><span class="s1">&#39;C&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">curve</span> <span class="o">=</span> <span class="n">ParametricRegion</span><span class="p">((</span><span class="mi">3</span><span class="o">*</span><span class="n">t</span> <span class="o">-</span> <span class="mi">2</span><span class="p">,</span> <span class="n">t</span> <span class="o">+</span> <span class="mi">1</span><span class="p">),</span> <span class="p">(</span><span class="n">t</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">))</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">ParametricIntegral</span><span class="p">(</span><span class="n">C</span><span class="o">.</span><span class="n">x</span><span class="p">,</span> <span class="n">curve</span><span class="p">)</span>
<span class="go">5*sqrt(10)/2</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">length</span> <span class="o">=</span> <span class="n">ParametricIntegral</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="n">curve</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">length</span>
<span class="go">sqrt(10)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">semisphere</span> <span class="o">=</span> <span class="n">ParametricRegion</span><span class="p">((</span><span class="mi">2</span><span class="o">*</span><span class="n">sin</span><span class="p">(</span><span class="n">phi</span><span class="p">)</span><span class="o">*</span><span class="n">cos</span><span class="p">(</span><span class="n">theta</span><span class="p">),</span> <span class="mi">2</span><span class="o">*</span><span class="n">sin</span><span class="p">(</span><span class="n">phi</span><span class="p">)</span><span class="o">*</span><span class="n">sin</span><span class="p">(</span><span class="n">theta</span><span class="p">),</span> <span class="mi">2</span><span class="o">*</span><span class="n">cos</span><span class="p">(</span><span class="n">phi</span><span class="p">)),</span>                            <span class="p">(</span><span class="n">theta</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">2</span><span class="o">*</span><span class="n">pi</span><span class="p">),</span> <span class="p">(</span><span class="n">phi</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="n">pi</span><span class="o">/</span><span class="mi">2</span><span class="p">))</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">ParametricIntegral</span><span class="p">(</span><span class="n">C</span><span class="o">.</span><span class="n">z</span><span class="p">,</span> <span class="n">semisphere</span><span class="p">)</span>
<span class="go">8*pi</span>
</pre></div>
</div>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">ParametricIntegral</span><span class="p">(</span><span class="n">C</span><span class="o">.</span><span class="n">j</span> <span class="o">+</span> <span class="n">C</span><span class="o">.</span><span class="n">k</span><span class="p">,</span> <span class="n">ParametricRegion</span><span class="p">((</span><span class="n">r</span><span class="o">*</span><span class="n">cos</span><span class="p">(</span><span class="n">theta</span><span class="p">),</span> <span class="n">r</span><span class="o">*</span><span class="n">sin</span><span class="p">(</span><span class="n">theta</span><span class="p">)),</span> <span class="n">r</span><span class="p">,</span> <span class="n">theta</span><span class="p">))</span>
<span class="go">0</span>
</pre></div>
</div>
</dd></dl>

</section>
</section>


            <div class="clearer"></div>
          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
            <p class="logo"><a href="../../../index.html">
              <img class="logo" src="../../../_static/sympylogo.png" alt="Logo"/>
            </a></p>
  <h3><a href="../../../index.html">Table of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Essential Classes in sympy.vector (docstrings)</a><ul>
<li><a class="reference internal" href="#coordsys3d">CoordSys3D</a></li>
<li><a class="reference internal" href="#vector">Vector</a></li>
<li><a class="reference internal" href="#dyadic">Dyadic</a></li>
<li><a class="reference internal" href="#del">Del</a></li>
<li><a class="reference internal" href="#parametricregion">ParametricRegion</a></li>
<li><a class="reference internal" href="#implicitregion">ImplicitRegion</a></li>
<li><a class="reference internal" href="#parametricintegral">ParametricIntegral</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="../vector_integration.html"
                        title="previous chapter">Applications of Vector Integrals</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="orienterclasses.html"
                        title="next chapter">Orienter classes (docstrings)</a></p>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="../../../_sources/modules/vector/api/classes.rst.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3 id="searchlabel">Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="https://docs.sympy.org/latest/search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>
    </div>
</div>
<script>$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="orienterclasses.html" title="Orienter classes (docstrings)"
             >next</a> |</li>
        <li class="right" >
          <a href="../vector_integration.html" title="Applications of Vector Integrals"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../../../index.html">SymPy 1.9 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="../../index.html" >SymPy Modules Reference</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="../index.html" >Vector</a> &#187;</li>
        <li class="nav-item nav-item-this"><a href="#">Essential Classes in sympy.vector (docstrings)</a></li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
        &#169; Copyright 2021 SymPy Development Team.
      Last updated on Sep 30, 2021.
      Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.1.2.
    </div>
  </body>

<!-- Mirrored from docs.sympy.org/latest/modules/vector/api/classes.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 15 Jan 2022 03:29:14 GMT -->
</html>